package cn.tide.question2.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

@Repository
public class testDao {
    @Autowired
    static DataSource ds;

    public static void main(String[] args) {
        try {
            Connection connection = ds.getConnection();
            System.out.println(connection);
            connection.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }


    }
}
